<? if(!defined('IN_MDL')) exit('Access Denied');?>
<? include $this->gettpl('header');?> 
<SCRIPT LANGUAGE="JavaScript">
<!--
	var process_request = "正在处理您的请求...";
<?=$pageinfo?>
//-->
</SCRIPT>
<script type="text/javascript" src="<?=APPPUBLIC?>js/check.js"></script>
<script type="text/javascript" src="<?=APPPUBLIC?>js/common.js"></script>
<script type="text/javascript" src="<?=APPPUBLIC?>js/order.js"></script>
<script type="text/javascript" src="<?=APPPUBLIC?>js/transport.js"></script>
<script type="text/javascript" src="<?=APPPUBLIC?>js/utils.js"></script>
<script type="text/javascript" src="<?=APPPUBLIC?>js/region.js"></script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#e6e6e6"><table width="920" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="200" valign="top"> <? include $this->gettpl('usermenu');?></td>
        <td width="720" bgcolor="#FFFFFF"><table width="700" border="0" align="center" cellpadding="0" cellspacing="10" bgcolor="#666666">
          <tr>
            <td height="580" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="720" height="1" colspan="3" bgcolor="#E6E6E6"></td>
                </tr>
              <tr>
                <td height="30" colspan="3" bgcolor="#f9f9f9"><table border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="25"><img src="<?=APPPUBLIC?>Images/Public/Point.gif" width="14" height="10" /></td>
                    <td class="Categories_Menu"><a href="#" class="Categories_Menu_a">首页</a> <font face="宋体">&gt;</font> 会员中心 <font face="宋体">&gt;</font> <strong>密码修改</strong></td>
                    </tr>
                  </table></td>
                </tr>
              <tr>
                <td height="1" colspan="3" bgcolor="#E6E6E6"></td>
                </tr>
              </table>
              
			  	<? foreach((array)$consignee_list as $sn => $consignee) {?>         
            <form action="<? echo U('User/act_edit_address')?>" name="theForm_<?=$sn?>" onsubmit="return address_modify(<?=$sn?>)"   method=post>   
              <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
                <tr>
                  <td align="right" bgcolor="#ffffff"><?=$lang['country_province']?>：</td>
                  <td colspan="3" align="left" bgcolor="#ffffff" id="select_<?=$sn?>">
				  
				  <select name="country" id="selCountries_<?=$sn?>" onchange="region.changed(this, 1, 'selProvinces_<?=$sn?>')">
                      <option value="0"><?=$lang['please_select']?><?=$name_of_region[0]?></option>                      
					  <? foreach((array)$country_list as $country) {?>    
                      <option value="<?=$country['region_id']?>"  <? if($consignee['country']== $country['region_id']) { ?>selected<? } ?> ><?=$country['region_name']?></option>
                      <?}?>
                    </select>
					<select name="province" id="selProvinces_<?=$sn?>" onchange="region.changed(this, 2, 'selCities_<?=$sn?>')">
                      <option value="0"><?=$lang['please_select']?><?=$name_of_region[1]?></option>                      
					    <? foreach((array)$province_list[$sn] as $province) {?>   
                      <option value="<?=$province['region_id']?>"    <? if($consignee['province']== $province['region_id']) { ?>selected<? } ?> ><?=$province['region_name']?></option>
                      <? } ?>
                    </select>

                    <select name="city" id="selCities_<?=$sn?>" onchange="region.changed(this, 3, 'selDistricts_<?=$sn?>')">
                      <option value="0"><?=$lang['please_select']?><?=$name_of_region[2]?></option>
                   
				    <? foreach((array)$city_list[$sn] as $city) {?> 
                      <option value="<?=$city['region_id']?>" <? if($consignee['city']== $city['region_id']) { ?>selected<? } ?> ><?=$city['region_name']?></option>
                      <? } ?>
                    </select>

                    <select name="district" id="selDistricts_<?=$sn?>" <? if(!$district_list[$sn]) { ?> style="display:none"<? } ?> >
                      <option value="0"><?=$lang['please_select']?><?=$name_of_region[3]?></option>
                     
					  <? foreach((array)$district_list[$sn] as $district) {?> 
                      <option value="<?=$district['region_id']?>" <? if($consignee['district']== $district['region_id']) { ?>selected<? } ?> ><?=$district['region_name']?></option>
                      <? } ?>
                    </select>

                  
                  <?=$lang['require_field']?> </td>
                </tr>

                <tr>
                  <td align="right" bgcolor="#ffffff"><?=$lang['consignee_name']?>：</td>
                  <td align="left" bgcolor="#ffffff"><input name="consignee" type="text" class="inputBg" id="consignee_<?=$sn?>" value="<?=$consignee['consignee']?>" />
                  <?=$lang['require_field']?> </td>
                  <td align=right bgcolor="#ffffff"><?=$lang['email_address']?>：</td>
                  <td align="left" bgcolor="#ffffff"><input name="email" type="text" class="inputBg" id="email_<?=$sn?>" value="<?=$consignee['email']?>" />
                  <?=$lang['require_field']?></td>
                </tr>

				 <tr>
                  <td align="right" bgcolor="#ffffff"><?=$lang['detailed_address']?>：</td>
                  <td align="left" bgcolor="#ffffff"><input name="address" type="text" class="inputBg" id="address_<?=$sn?>" value="<?=$consignee['address']?>" />
                  <?=$lang['require_field']?></td>
                  <td align="right" bgcolor="#ffffff"><?=$lang['postalcode']?>：</td>
                  <td align="left" bgcolor="#ffffff"><input name="zipcode" type="text" class="inputBg" id="zipcode_<?=$sn?>" value="<?=$consignee['zipcode']?>" /></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff"><?=$lang['phone']?>：</td>
                  <td align="left" bgcolor="#ffffff"><input name="tel" type="text" class="inputBg" id="tel_<?=$sn?>" value="<?=$consignee['tel']?>" />
                  <?=$lang['require_field']?></td>
                  <td align="right" bgcolor="#ffffff"><?=$lang['backup_phone']?>：</td>
                  <td align="left" bgcolor="#ffffff"><input name="mobile" type="text" class="inputBg" id="mobile_<?=$sn?>" value="<?=$consignee['mobile']?>" /></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff"><?=$lang['sign_building']?>：</td>
                  <td align="left" bgcolor="#ffffff"><input name="sign_building" type="text" class="inputBg" id="sign_building_<?=$sn?>" value="<?=$consignee['sign_building']?>" /></td>
                  <td align="right" bgcolor="#ffffff"><?=$lang['deliver_goods_time']?>：</td>
                  <td align="left" bgcolor="#ffffff"><input name="best_time" type="text"  class="inputBg" id="best_time_<?=$sn?>" value="<?=$consignee['best_time']?>" /></td>
                </tr>
                <tr>
                  <td align="right" bgcolor="#ffffff">&nbsp;</td>
                  <td colspan="3" align="center" bgcolor="#ffffff"><? if($consignee['consignee'] && $consignee.email) { ?>
                    <input type="submit" name="submit" class="bnt_blue_1" value="<?=$lang['confirm_edit']?>" />
                    <input name="button" type="button" class="bnt_blue"  onclick="if (confirm('<?=$lang['confirm_drop_address']?>'))location.href='<? echo U('drop_consignee',array('id'=>$consignee['address_id']))?>'" value="<?=$lang['drop']?>" />
                    <? } else { ?>
                    <input type="submit" name="submit" class="bnt_blue_2"  value="<?=$lang['add_address']?>"/>
                    <? } ?>
                    <input type="hidden" name="act" value="act_edit_address" />
                    <input name="address_id" type="hidden" value="<?=$consignee['address_id']?>" />
                  </td>
                </tr>
               
              </table>
            </form>
<? } ?>	
			  
			  </td>
            </tr>
        </table></td>
        </tr>
    </table></td>
  </tr>
</table>
 

<? include $this->gettpl('footer');?>